import React from 'react';
import ErrorMsg from './ErrorMsg';
import ConfirmInfo from './ConfirmInfo';
import RejectInfo from './RejectInfo';
import AgentInfo from './AgentInfo';
import SubmitShowInfo from './SubmitShowInfo';

import FreeWorkflowSimpleInfo from './FreeWorkflowSimpleInfo';

export default class Prompt extends React.Component{
    render(){
        const { promptInfos=[] } = this.props;
        let domarr=[];
        promptInfos.map(item=>{
            const {prompttype}=item;
            prompttype === "errormsg"&&domarr.push( <ErrorMsg {...item} />)
            // prompttype === "confirminfo"&&domarr.push( <ConfirmInfo {...item} />)
            prompttype === "rejectinfo"&&domarr.push( <RejectInfo {...item} />)
            prompttype === "agentinfo"&&domarr.push( <AgentInfo {...item} />)
            prompttype === "showContent"&&domarr.push( <SubmitShowInfo {...item} />)
            prompttype === "freeWorkflowSimpleInfo"&&domarr.push( <FreeWorkflowSimpleInfo {...item} />)
        })
        return domarr;
    }
}